<template>
    <div class="store-account">
        <!--<div>-->
        <!--<button @click="login">登录</button>-->
        <!--</div>-->

        <!--<van-button type="danger" @click="openAlert">测试弹窗</van-button>-->

        <van-button type="primary" @click="sendMessage()">测试websocket</van-button>

    </div>
</template>

<script>
    import Vue from 'vue'
    import {Toast, Button, Dialog} from 'vant'
    Vue.use(Toast)
    Vue.use(Button)
    Vue.use(Dialog)


    export default {
        name: "StoreAccount",
        data() {
            return {}
        },
        computed: {},
        methods: {
            openAlert() {
                Dialog.alert({
                    title: '标题',
                    message: '弹窗内容'
                }).then(() => {
                    // on close
                });
            },
            sendMessage() {
                let data = 'hello'
            },
            login() {
                let account = "123", password = "123"
                this.$api.store.login({account: account, password: password}).then(res => {
                    console.log(res)
                }).catch(error => {
                    console.log(error)
                })
            },


        }

    }
</script>

<style scoped>

</style>
